package com.glsc.ngateway.common.base.repo.mysql.gateway.oaflow;

import com.glsc.ngateway.common.base.domain.mysql.gateway.oaflow.TFlowAppendixHistoryTable;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Repository;

@Repository
public interface TFlowAppendixHistoryTableRepository extends JpaRepository<TFlowAppendixHistoryTable, Long> {


    @Query(value = "select count(1) from TFlowAppendixHistoryTable m where m.appendId = :appendId and m.requestId = :requestId and m.callSystemId = :callSystemId ")
    Integer countAppendIdRepeat(@Param("appendId") String appendId
            , @Param("requestId") String requestId
            , @Param("callSystemId") String callSystemId);

}
